using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TimeWar.StarTrek;
using TimeWar;
using Microsoft.Xna.Framework;
using TimeWar.Daleks;

namespace TimeWar
{
    public class DemoObjectFactory : CRenderedObjectFactory
    {

        public DemoObjectFactory(Game game, GameScreen screen)
            : base(game, screen)
        {
            //m_screen = screen;
        }

        protected override CRenderedObject constructObject(ObjectTypes p_type)
        {
            CRenderedObject obj = null;

            if (p_type == ObjectTypes.Starship)
            {
                obj = new Starship(m_game, @"Federation\\Starships\\SovereignBc", m_screen, generateObjectId());
            }
            else if (p_type == ObjectTypes.Dalek)
            {
                obj = new Dalek(m_game, m_screen, generateObjectId());
            }

            manageObjects(obj);  //ensures objects are added only once

            return obj;

        }

        public Dalek constructDalek()
        {
            return (Dalek)constructObject(ObjectTypes.Dalek);
        }

        public Starship constructFederationStarship()
        {
            return (Starship)constructObject(ObjectTypes.Starship);
        }

    }
}